import {NgModule} from '@angular/core';

import {RouterModule, Routes} from '@angular/router';
import {AuthGuardService} from '../service/authGuardService/auth-guard.service';
import {AdmindefultComponent} from './admindefult/admindefult.component';
import {AdminDashboardComponent} from './admin-dashboard/admin-dashboard.component';
import {ManageHeroesComponent} from './manage-heroes/manage-heroes.component';
import {ManageCrisesComponent} from './manage-crises/manage-crises.component';
import {PageNotFoundComponent} from '../shared/page-not-found/page-not-found.component';
const adminRoutes: Routes = [
  {
    path: '',
    component: AdmindefultComponent,
    // canActivate: [AuthGuardService],
    children: [
      {
        path: '',
        // canActivateChild: [AuthGuardService],
        children: [
          {path: 'crises', component: ManageCrisesComponent},
          {path: 'heroes', component: ManageHeroesComponent},

          {path: '', component: AdminDashboardComponent},

        ]
      }
    ]
  }
];
@NgModule({
  imports: [
    RouterModule.forChild(adminRoutes)
  ],
  exports: [
    RouterModule
  ]
})
export class AdminRoutingModule {
}
